package com.hgw.Demo01_ChainOfResponsibilityPattern.Exercises16_8_4;

/**
 * Data time:2021/12/16 15:57
 * StudentID:2019112118
 * Author:hgw
 * Description: 排长类，具体处理者
 */
public class PaiZhang extends Officer{
    public PaiZhang(String name) {
        super(name);
    }

    @Override
    public void processRequest(Mission mission) {
        if (mission.getNumPeo() < 50) {
            System.out.println("军情：" + mission.getInformation() + mission.getNumPeo() + "个鬼子; 排长：" + this.name + "下达作战命令！");
        } else {
            this.successor.processRequest(mission);
        }
    }
}
